package com.ss.pku.entity.node;

import java.util.ArrayList;
import java.util.List;

import com.ss.pku.entity.edge.ASTEdge;

public class ASTNode extends BaseNode {
	private ASTNode previous;
	private List<ASTNode> nexts;
	private List<ASTEdge> edges;
	private int depth;
	public ASTNode(ASTNode previous){
		this.nexts=new ArrayList<ASTNode>();
		this.previous=previous;
		this.edges=new ArrayList<ASTEdge>();
		if(previous!=null){
			this.previous.AddNextNode(this);
		}
		
	}
	public ASTNode(ASTNode previous,int depth){
		this(previous);
		this.depth=0;
	}
	public Boolean AddNextNode(ASTNode node) {
		// TODO Auto-generated method stub
		ASTEdge edge=new ASTEdge(0, this, node);
		this.edges.add(edge);
		return this.nexts.add(node);
	}
	
}
